﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace ESOL.Common.Entity
{
    [DataContract]
    public class ProdMaintainPo
    {
        [DataMember]
        public string Id { set; get; }
        [DataMember]
        public string CreatedBy { set; get; }
        [DataMember]
        public string CreatedUser { set; get; }
        [DataMember]
        public DateTime CreatedDate { set; get; }
        [DataMember]
        public string UpdatedBy { set; get; }
        [DataMember]
        public string UpdatedUser { set; get; }
        [DataMember]
        public DateTime UpdatedDate { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string ProdPoNo { set; get; }
        [DataMember]
        public Decimal Qty { set; get; }
        [DataMember]
        public DateTime RequiredDate { set; get; }
        [DataMember]
        public string ProductId { set; get; }
        [DataMember]
        public string BlueprintId { set; get; }
        [DataMember]
        public string ProductName { set; get; }
        [DataMember]
        public string ProductCode { set; get; }
        [DataMember]
        public string BomId { set; get; }
        [DataMember]
        public string ContractModel { set; get; }
        [DataMember]
        public string SalesAppId { set; get; }
        [DataMember]
        public string SalesAppNo { set; get; }
        [DataMember]
        public string SalesAppItemId { set; get; }
        [DataMember]
        public string InvType { set; get; }
        [DataMember]
        public string InvLocation { set; get; }
        [DataMember]
        public string Remark { set; get; }
        [DataMember]
        public string Status { set; get; }
        [DataMember]
        public DateTime  StartTime { set; get; }
        [DataMember]
        public int IsMark { set; get; }
        [DataMember]
        public int Cnt { set; get; }
    }

    [DataContract]
    public class ProdPoQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string PoNo { set; get; }
        [DataMember]
        public string ProductName { set; get; }
        [DataMember]
        public string ProductCode { set; get; }
        [DataMember]
        public string ContractModel { set; get; }
        [DataMember]
        public string Status { set; get; }
    }

    [DataContract]
    public class ProdWoQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string PoNo { set; get; }
        [DataMember]
        public string WoNo { set; get; }
        [DataMember]
        public string ContractModel { set; get; }
        [DataMember]
        public string ProductName { set; get; }
        [DataMember]
        public string ProductCode { set; get; }
        [DataMember]
        public string Status { set; get; }
    }

    [DataContract]
    public class ProdMaintainWo
    {
        [DataMember]
        public string Id { set; get; }
        [DataMember]
        public string CreatedBy { set; get; }
        [DataMember]
        public string CreatedUser { set; get; }
        [DataMember]
        public DateTime CreatedDate { set; get; }
        [DataMember]
        public string UpdatedBy { set; get; }
        [DataMember]
        public string UpdatedUser { set; get; }
        [DataMember]
        public DateTime UpdatedDate { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string WoNo { set; get; }
        [DataMember]
        public string PoNo { set; get; }
        [DataMember]
        public string ContractModel { set; get; }
        [DataMember]
        public string BomItemId { set; get; }
        [DataMember]
        public string BomTechnicId { set; get; }
        [DataMember]
        public string ProductId { set; get; }
        [DataMember]
        public string ProductName { set; get; }
        [DataMember]
        public string ProductCode { set; get; }
        [DataMember]
        public string BlueprintId { set; get; }
        [DataMember]
        public decimal WoQty { set; get; }
        [DataMember]
        public string Unit { set; get; }
        [DataMember]
        public string Type { set; get; }
        [DataMember]
        public DateTime RequiredDate { set; get; }
        [DataMember]
        public string Status { set; get; }
        [DataMember]
        public DateTime PlanStartDate { set; get; }
        [DataMember]
        public string ParentWoNo { set; get; }
        [DataMember]
        public string PoId { set; get; }
    }

    [DataContract]
    public class ProdWoPickQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string PickNo { set; get; }
        [DataMember]
        public string Type { set; get; }
        [DataMember]
        public string WhNo { set; get; }
        [DataMember]
        public DateTime CreatedDateFrom { set; get; }
        [DataMember]
        public DateTime CreatedDateTo { set; get; }
        [DataMember]
        public string MaterialId { set; get; }
        [DataMember]
        public string Status { set; get; }

    }

    [DataContract]
    public class ProdTechnicQueryCondition
    {
        [DataMember]
        public string Name { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string Type { set; get; }
        
    }

    [DataContract]
    public class ProdWoTaskCondition
    {
        [DataMember]
        public string WoNo { set; get; }
        [DataMember]
        public string ContractModel { set; get; }
        [DataMember]
        public string TechnicName { set; get; }
        [DataMember]
        public DateTime RequiredDate { set; get; }
        [DataMember]
        public string ProductId { set; get; }
        [DataMember]
        public string ProductName { set; get; }
        [DataMember]
        public string UserNo { set; get; }
        [DataMember]
        public string WoStatus { set; get; }
        [DataMember]
        public string WorkGroupNo { set; get; }

    }

    [DataContract]
    public class ProdMaintainWoTask
    {
        [DataMember]
        public string Id { set; get; }
        [DataMember]
        public int WoId { set; get; }
        [DataMember]
        public int Sequence { set; get; }
        [DataMember]
        public int TechnicId { set; get; }
        [DataMember]
        public int TechnicName { set; get; }
        [DataMember]
        public int UserNo { set; get; }
        [DataMember]
        public decimal RequiredQty { set; get; }
        [DataMember]
        public DateTime RequiredTimeFrom { set; get; }
        [DataMember]
        public DateTime RequiredTimeTo { set; get; }
        [DataMember]
        public decimal ReportedQty { set; get; }
        [DataMember]
        public string ReportedBy { set; get; }
        [DataMember]
        public string ReportedUser { set; get; }
        [DataMember]
        public DateTime ReportedDate { set; get; }
        [DataMember]
        public string Status { set; get; }
        
    }

    [DataContract]
    public class ProdMaintainPickItem
    {
        [DataMember]
        public string BomItemId { get; set; }
        [DataMember]
        public decimal LossRate { get; set; }
        [DataMember]
        public decimal PickQty { get; set; }
        [DataMember]
        public string ProductCode { get; set; }
        [DataMember]
        public string ProductId { get; set; }
        [DataMember]
        public string ProductName { get; set; }
        [DataMember]
        public decimal StgQty { get; set; }
        [DataMember]
        public decimal UnitDose { get; set; }

    }


     [DataContract]
    public class ScheduleInput
    {
         [DataMember]
        public string PlanOrder { get; set; }
         [DataMember]
        public string WoNo { get; set; }
         [DataMember]
        public string WorkGroupId { get; set; }
         [DataMember]
         public string WorkGroupName { get; set; }
         [DataMember]
        public int Sequence { get; set; }
         [DataMember]
         public string TechnicId { get; set; }
         [DataMember]
         public string TechnicName { get; set; }
         [DataMember]
        public decimal Qty { get; set; }
         [DataMember]
        public DateTime StartDate { get; set; }
       
    }

    // [DataContract]
    //public class ScheduleOutput
    //{
    //      [DataMember]
    //    public string PlanOrder { get; set; }
    //      [DataMember]
    //    public string WoNo { get; set; }
    //      [DataMember]
    //    public string WorkGroupId { get; set; }
    //      [DataMember]
    //    public int Sequence { get; set; }
    //      [DataMember]
    //     public string TechnicId { get; set; }
    //      [DataMember]
    //    public decimal Qty { get; set; }
    //      [DataMember]
    //    public DateTime StartTime { get; set; }
    //      [DataMember]
    //    public DateTime EndTime { get; set; }
    //      [DataMember]
    //    public int prodIndex { get; set; }
         
    //}

   
     public partial class ProdWorkgroupEntity
     {
         [DataMember]
         public string CreatedUser { set; get; }
         [DataMember]
         public string UpdatedUser { set; get; }
         [DataMember]
         public string KeyUser { set; get; }
     }

     public partial class ProdCooperationOrderEntity
     {
         [DataMember]
         public string PoNo { get; set; }
         [DataMember]
         public string ContractModel { get; set; }
     }
}
